#ifndef FORMDEVINFO_H
#define FORMDEVINFO_H

#include <QWidget>
#include "g_config.h"
 #include "formkeyboard.h"

#include <QDebug>
#include <QMouseEvent>
#include <QListView>
#include <QTime>

#include <QSettings>
#include "common/common_data.h"

namespace Ui {
class FormDevInfo;
}

class FormDevInfo : public QWidget
{
    Q_OBJECT

public:
    explicit FormDevInfo(QWidget *parent = nullptr);
    ~FormDevInfo();

    static QString gas_name;
    static QString gas_unit;
    inline static QString ccid_num = "000";
    inline static QString imei_num = "000";

signals:
    void backRequested();

protected:
    void closeEvent(QCloseEvent *event) override;

public slots:
    void ttyusb2_to_devinfo_slot(QString str, QString str_1);
    void rs232_to_devinfo_slot(QString deviceId);

private slots:
    bool eventFilter(QObject *obj,QEvent *e);
     void formkeyboard_close_slot();
    void on_pushButton_clicked();
    void on_pushButton_2_clicked();

private:
    Ui::FormDevInfo *ui;
     FormKeyBoard *keyboard = nullptr;

    void delay_ms(unsigned int ms);
    void LoadDevInfo();
};
#endif // FORMDEVINFO_H
